import java.util.Random;

/** Class to contruct a random number based on probability. Generates a minimum of 6 elements
  * Each time the number increases by one, the probability of it increasing again is 50%
  * */

public class GenerateRandomNumber
{
  
  public static int generateNumber()
  {
    int returnedNumber = 5;
    
    boolean continueLoopIfTrue = true;
    
    while( continueLoopIfTrue )
    {
      Random generateRandom = new Random();
      returnedNumber++;
      continueLoopIfTrue = generateRandom.nextBoolean();
    }
    return returnedNumber;
  }
}